package com.int_tech.utils;

import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

/**
 * Created by Administrator on 2017/10/23.
 */
public class PoiHelp {
    public static Object workbookPoiHelp(String path){
        String[] split = path.split(".");
        if (split[1].equals("xls")){
             HSSFWorkbook workbook = new HSSFWorkbook();
             return workbook;
        }
            XSSFWorkbook workbook = new XSSFWorkbook();
            return workbook;
    }

//    public static Object hssfSheetHelp(String path,int numSheet){
//        String[] split = path.split(".");
//        if (split[1].equals("xls")){
//            HSSFSheet hssfSheet = workbook.getSheetAt(numSheet);
//            return workbook;
//        }
//        XSSFWorkbook workbook = new XSSFWorkbook();
//        return workbook;
//    }

}
